(function($) {
	//拖拽后显示操作图标，点击操作图标删除元素；
	$('#gonggaoWrap').on('tap', '.mui-btn', function(event) {
		var elem = this;
		var idNode = this.parentNode.parentNode.querySelector('#idNode').value;
		console.log(idNode);
		var li = elem.parentNode.parentNode;
		$.ajax({
			url:'/weishang/supplier/deleteMessage',
			data:{
				'mallActivityId':idNode
			},
			dataType:'JSON',
			type:'POST',
			success:function(res){
				res = eval("("+res+")");
				if(res['code']=='200'){
					li.parentNode.removeChild(li);
				}else{
					$.swipeoutClose(li);
				}
			}
		});
	});
})(mui);
if($('#type').val() == 5){
	mui('body').on('tap','.mui-media',function(){
		var aBtn = $('.mui-btn-red').length;
		var aStatus = true;
		for(var i = 0,len = aBtn;i < len;i ++){
			if($('.mui-btn-red').eq(i).css('transform').split(',')[$('.mui-slider-handle').css('transform').split(',').length-2] != 0){
				aStatus = false;
			}
		}
		if(aStatus){
			window.location.href='/weishang/supplier/messageDetail.htm?mallActivityId='+$(this).attr('mallActivity');
		}else{
			$('.mui-slider-handle').css('transform','translate(0px,0px)');
		}
	})
}
